package com.hqq.behaviour.visitor;

/**
 * Unit
 * Created by heqianqian on 2017/6/30.
 */
public abstract class Unit {

    private Unit[] children;

    public Unit(Unit... children) {
        this.children = children;
    }

    public void accept(UnitVisitor unitVisitor) {
        for (Unit unit : children) {
            unit.accept(unitVisitor);
        }
    }
}
